package com.azzcs.stage9module2.controller;

import com.azzcs.stage9module2.mapper.TestMapper;
import com.azzcs.stage9module2.mapper.entity.TestEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: wzg
 * @Date: 2021/5/25 上午8:01
 */
@RestController
public class TestController {
    @Resource
    private TestMapper testMapper;

    @GetMapping("test/{id}")
    public TestEntity getById(@PathVariable("id") Long id){
        return testMapper.selectById(id);
    }
}
